<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <cpn2></cpn2>
</div>
<script src="../js/vue.js"></script>
<script>
    const cpnC1 = Vue.extend({
        template: `
        <div>
        <h2>标题1</h2>
        <p>agadfgadsf</p>
        <p>sdfhsdfg</p>
        </div>
        `
    })
    const cpnC2 = Vue.extend({
        template: `
          <div>
          <h2>标题2</h2>
          <p>asdfeawfsa</p>
          <p>asfgrwth</p>
          <cpn1></cpn1>
          </div>
        `,
        components: {
            cpn1: cpnC1
        }
    })
    let app = new Vue({
        el: '#app',
        data: {
            message: '123',
            name: '321',
        },
        components: {
            cpn2: cpnC2
        }
    })
</script>
</body>
</html>